package com.zhao.eduservice.config;

import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xiaoZhao
 * @date 2022/10/8
 * @describe
 */
@Configuration
@MapperScan("com.zhao.eduservice.mapper")
public class EduConfig {
 
    /**
    * @author xiaoZhao  
    * @date 2022/10/8 17:00
    *  逻辑删除插件
    **/
    @Bean
    public ISqlInjector sqlInjector(){
        return new LogicSqlInjector();
    }

    /**
    * @author xiaoZhao
    * @date 2022/10/8 21:07
    * @param []
    * @return 分页插件
    **/
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
